' This BASIC Anywhere Machine program by Charlie Veniot
' Based on the "Flower Wheel" QBJS program by bplus (https://qb64.boards.net/thread/27/bplus⁣-⁣collection)

' 📚 Subroutines
Sub drawc (x, y, r, a, n, o)
    dim t, xx, yy
    If n > 0 Then
        For t = 0 To _Pi(2) Step _Pi(1 / 3)
            xx = x + r * Cos(t + o)
            yy = y + r * Sin(t + o)
            Circle (xx, yy), r
            drawc (xx, yy, a * r, a, n ⁣-⁣ 1, ⁣-⁣o ⁣-⁣ n * _Pi / 180)
        Next
    End If
End Sub

' 🏁 Main program
myW = 640
myH = 560
Screen _newimage(myW, myH, 12)
dim o
Do
    Cls
    o = o + _Pi / 180
    drawc (myW / 2, myH / 2, myW / 5, .25, 4, o)
    _display
Loop